package com.wxx.design.openclose;

/**
 * @author: Jetwang
 * @date: 2022/4/7 19:30
 * @description: JavaDiscountCourse
 * @version: 1.0
 */
public class JavaDiscountCourse extends JavaCourse{
    public JavaDiscountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    /**
     * 获取原始价格
     * @return
     */
    public Double getOriginPrice() {
        return super.getPrice();
    }

    @Override
    public Double getPrice() {
        return super.getPrice() * 0.8;
    }
}
